<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<SCRIPT src="style/js/ckeditor/ckfinder/ckfinder.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/ckeditor/ckeditor.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/jquery-1.4.2.min.js" type=text/javascript></SCRIPT>
<link rel="stylesheet" href="style/css/common.css" type="text/css" />

<script type="text/javascript">
function sub(){
	var f = document.getElementById("form1");
	if (ispreview == '1'){
		f.action = 'index.php?m=preview&a=article';
		f.target = '_blank';
	} else {
		f.action = 'index.php?m=article&a=edit';
		f.target = '';
	}
}
$(document).ready(function(){
	//<![CDATA[
	CKEDITOR.replace( 'body' );
	//]]>
	CKFinder.SetupCKEditor(CKEDITOR, 'style/js/ckeditor/ckfinder/');	
	if (parent) setTimeout(function(){parent.restIframe();},500);
	$("#referrer").val(document.referrer);
});
</script>
</head>

<body>
<div id="man_zone">
<form id="form1" name="form1" method="post" action="index.php?m=article&a=edit" onsubmit="return sub();">
<table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
  <tr>
    <td align="right">文章标题</td>
    <td>
      <input type="text" name="title" value="<%$article.title%>" size="60"  />
    </td>
  </tr>
  <tr>
    <td align="right">副标题</td>
    <td><input type="text" name="ftitle" value="<%$article.ftitle%>"  size="60" /></td>
  </tr>
   <tr>
    <td align="right">审核</td>
    <td>
    <input name="audit" type="checkbox" value="1" <%if $article.html%>checked="checked"<%/if%>>
    </td>
  </tr>
  <tr>
    <td align="right">自定义属性</td>
    <td>
      <label>
      	头条<input name="flag[]" type="checkbox" id="checkbox"<%if $article.flag&&in_array('h',$article.flag)%> checked="checked"<%/if%> value="h" />
      </label>
      <label>
      	推荐<input name="flag[]" type="checkbox" id="checkbox" <%if $article.flag&&in_array('c',$article.flag)%> checked="checked"<%/if%> value="c" />
      </label>
      <label>
      	幻灯<input name="flag[]" type="checkbox" id="checkbox"<%if $article.flag&&in_array('f',$article.flag)%> checked="checked" <%/if%> value="f" />
      </label>
      <label>
      	特荐<input name="flag[]" type="checkbox" id="checkbox"<%if $article.flag&&in_array('a',$article.flag)%> checked="checked"<%/if%> value="a" />
      </label>
      <label>
      	图片<input name="flag[]" type="checkbox" id="checkbox"<%if $article.flag&&in_array('p',$article.flag)%> checked="checked"<%/if%> value="p" />
      </label>
    </td>
  </tr>
   <tr>
    <td align="right">所属栏目</td>
    <td>
    <select name="classid">
    <%foreach item=val from=$columns%>
    <option value="<%$val.classid%>"<%if $val.classid eq $article.classid%> selected="selected"<%/if%>><%$val.classname%></option>
    <%/foreach%>
    </select>
    </td>
  </tr>
  <tr>
    <td align="right">缩略图</td>
    <td><input type="text" name="litpic" value="<%$article.litpic%>"  size="60" /></td>
  </tr>
   <tr>
    <td align="right">排序</td>
    <td><input type="text" name="sort" value="<%$article.sort%>"  /></td>
  </tr>
  <tr>
    <td align="right">作者</td>
    <td><input type="text" name="writer" value="<%$article.writer%>"  /></td>
  </tr>
  <tr>
    <td align="right">tag</td>
    <td><input type="text" name="tag" value="<%$article.tag%>"  /></td>
  </tr>
  <tr>
    <td align="right">关键字</td>
    <td><input type="text" name="keyword" value="<%$article.keyword%>"  size="60" /></td>
  </tr>
   <tr>
    <td align="right">摘要</td>
    <td><textarea name="digest" cols="6" rows="4" style="width:500px;"><%$article.digest%></textarea></td>
  </tr>
  <tr>
    <td align="right">内容</td>
    <td>
    <textarea name="body" id="body" class="body" cols="8" rows="6" style="width:500px;"><%$article.content%></textarea>
    </td>
  </tr>
  
  <tr>
    <td colspan="2">
    <input type="hidden" name="id" value="<%$article.id%>" />
    <input type="hidden" name="wid" value="<%$arg.wid%>" />
    <input type="hidden" name="referrer" id="referrer" value="" />
    <%if !$arg.ajax%>
    <input name="preview" id="preview" type="submit" value="预览" onclick="ispreview=1;"  />
    <input name="" type="submit" value="提交" onclick="ispreview=0;" />
    <%/if%>
    </td>
  </tr>
  
</table>
</form>
</div>
</body>
</html>